home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / haziran / 19 / setup.exe / data.z / cmos_lib.h < prev    next >
C/C++ Source or Header  |  2001-04-11  |  1KB  |  58 lines

  1. //////////////////////////////////////////////////////////////////////
  2. // File - cmos_lib.h
  3. //
  4. // Library for accessing the CMOS on the motherboard directly,
  5. // Code was generated by WinDriver Wizard.
  6. // Application uses WinDriver to access hardware.
  7. // 
  8. //////////////////////////////////////////////////////////////////////
  9.  
  10. #ifndef _CMOS_LIB_H_
  11. #define _CMOS_LIB_H_
  12.  
  13. // 'windrvr.h' is located in the WinDriver include directory,
  14. #include "../../include/windrvr.h"
  15. #include "../shared/bits.h"
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. typedef enum
  22. {
  23.     CMOS_IO = 0,
  24.     CMOS_ITEMS = 1
  25. } CMOS_ADDR;
  26.  
  27. // IO ranges definitions
  28. enum { CMOS_IO_ADDR = 0x70 };
  29. enum { CMOS_IO_BYTES = 0x2 };
  30.  
  31. // CMOS register definitions 
  32. enum { CMOS_Address_OFFSET = 0x0 };
  33. enum { CMOS_Data_OFFSET = 0x1 };
  34.  
  35. typedef struct CMOS_STRUCT *CMOS_HANDLE;
  36.  
  37. typedef struct CMOS_STRUCT
  38. {
  39.     HANDLE hWD;
  40.     WD_CARD_REGISTER cardReg;
  41. } CMOS_STRUCT;
  42.  
  43. BOOL CMOS_Open (CMOS_HANDLE *phCMOS);
  44. void CMOS_Close(CMOS_HANDLE hCMOS);
  45.  
  46. BYTE CMOS_Read (CMOS_HANDLE hCMOS, BYTE addr);
  47. void CMOS_Write (CMOS_HANDLE hCMOS, BYTE addr, BYTE data);
  48.  
  49. // this string is set to an error message, if one occurs
  50. extern CHAR CMOS_ErrorString[];
  51.  
  52.  
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56.  
  57. #endif
  58.